From: kfraser@localhost.localdomain Date: Wed, 3 Jan 2007 10:53:45 +0000 (+0000) Subject: [HVM][SVM] Triple faulkts (shutdown state) causes domain reset. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~104 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=d5810c67c145ede0ee0d35ee1c71cb6a894ccdd3;p=xen.git [HVM][SVM] Triple faulkts (shutdown state) causes domain reset. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 119b3bd625..8d8de4c513 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -271,8 +271,10 @@ void hvm_hlt(unsigned long rflags) void hvm_triple_fault(void) { - gdprintk(XENLOG_INFO, "Triple fault - reset.\n"); - domain_shutdown(current->domain, SHUTDOWN_reboot); + struct vcpu *v = current; + gdprintk(XENLOG_INFO, "Triple fault on VCPU%d - " + "invoking HVM system reset.\n", v->vcpu_id); + domain_shutdown(v->domain, SHUTDOWN_reboot); } /* diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index a5ade4c0ad..16c03273d6 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2701,23 +2701,14 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs) } break; + case VMEXIT_INTR: case VMEXIT_NMI: - break; - case VMEXIT_SMI: - /* - * For asynchronous SMI's, we just need to allow global interrupts - * so that the SMI is taken properly in the context of the host. The - * standard code does a STGI after the VMEXIT which should accomplish - * this task. Continue as normal and restart the guest. - */ + /* Asynchronous events, handled when we STGI'd after the VMEXIT. */ break; case VMEXIT_INIT: - /* - * Nothing to do, in fact we should never get to this point. - */ - break; + BUG(); /* unreachable */ case VMEXIT_EXCEPTION_BP: #ifdef XEN_DEBUGGER @@ -2779,9 +2770,6 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs) vmcb->general1_intercepts &= ~GENERAL1_INTERCEPT_VINTR; break; - case VMEXIT_INTR: - break; - case VMEXIT_INVD: svm_vmexit_do_invd(vmcb); break; @@ -2867,8 +2855,8 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs) break; case VMEXIT_SHUTDOWN: - gdprintk(XENLOG_ERR, "Guest shutdown exit\n"); - goto exit_and_crash; + hvm_triple_fault(); + break; default: exit_and_crash: